#字典中嵌套列表
favorite_language = {
    'jen':['python','ruby'],
    'sarah':['c'],
    'edward':['ruby','go'],
    'phil':['python','haskell'],
}
for name,languages in favorite_language.items():
    if len(languages) == 1:
        print(f"\n{name} is favorite language is {languages[0]}")
    else:
        print(f"\n{name.title()} is favorite languages are:")
        for language in languages:
            print(f"\t{language.title()}")
#字典中嵌套字典
users = {
    'aeinst':{
        'first':'albert',
        'last':'einstein',
        'location':'princeton',
    },
    'mcurie':{
        'first':'marie',
        'last':'curie',
        'location':'paris',
    },
}
for usenames,user_info in users.items():
    print(f"\nusename:{usenames}")
    full_name = f"{user_info['first']}{user_info['last']}"
    location = f"{user_info['location']}"
    print(f"\tfull_name:{full_name}")
    print(f"\tlocation:{location}")